Skip to content

Conversation

Dt8333
Copy link
Contributor

@Dt8333 Dt8333 commented Oct 15, 2025

fixes #3037
可能影响的PR #2892


Motivation / 动机

修复了会话控制触发期间,webchat输入框被禁用导致用户无法响应会话控制的问题。

Modifications / 改动点

dashboard/src/components/chat/Chat.vue
删除了Input在isConvRunning时的disable属性。
新增activeSSE计数器用于正确判断当前会话状态,防止session_waiter执行期间新的输入使界面显示异常(progress-circular消失)。
在流式输入结束后设置isStreaming以恢复文本框。

Verification Steps / 验证步骤

  1. 使用webchat触发会话控制。
    检查输入框是否可用。
  2. 在会话控制生效期间继续输入。
    检查progress-circular是否仍正常显示(表示会话未停止)
  3. 使用webchat触发流式输出
    检查流式输出期间输入框是否正确禁用、输出结束后输入框是否恢复。

Screenshots or Test Results / 运行截图或测试结果

Compatibility & Breaking Changes / 兼容性与破坏性变更

  • 这是一个破坏性变更 (Breaking Change)。/ This is a breaking change.
  • 这不是一个破坏性变更。/ This is NOT a breaking change.

Checklist / 检查清单

  • 😊 如果 PR 中有新加入的功能,已经通过 Issue / 邮件等方式和作者讨论过。/ If there are new features added in the PR, I have discussed it with the authors through issues/emails, etc.
  • 👀 我的更改经过了良好的测试,并已在上方提供了“验证步骤”和“运行截图”。/ My changes have been well-tested, and "Verification Steps" and "Screenshots" have been provided above.
  • 🤓 我确保没有引入新依赖库,或者引入了新依赖库的同时将其添加到了 requirements.txtpyproject.toml 文件相应位置。/ I have ensured that no new dependencies are introduced, OR if new dependencies are introduced, they have been added to the appropriate locations in requirements.txt and pyproject.toml.
  • 😮 我的更改没有引入恶意代码。/ My changes do not introduce malicious code.

Sourcery 总结

在对话控制期间启用 webchat 输入,并且仅在活跃流式传输期间禁用它,同时使用新计数器精确跟踪流式传输会话,以维护对话指示器并在流式传输完成时恢复输入字段。

Bug 修复:

  • 允许 webchat 文本输入在对话控制期间保持启用状态,而不是被永久禁用。
  • 在流式传输响应结束后立即重新启用输入字段。

增强功能:

  • 添加一个 activeSSECount 计数器,以精确跟踪正在进行的 SSE 流并管理对话运行状态。
Original summary in English

Summary by Sourcery

Enable the webchat input during conversation control and only disable it during active streaming, while accurately tracking streaming sessions with a new counter to maintain the conversation indicator and restore the input field when streaming completes.

Bug Fixes:

  • Allow the webchat text input to remain enabled during conversation control instead of being permanently disabled.
  • Re-enable the input field immediately after a streaming response finishes.

Enhancements:

  • Add an activeSSECount counter to accurately track ongoing SSE streams and manage the conversation running state.

删除了Input在isConvRunning的disable属性。新增activeSSE计数器用于正确判断当前会话状态,防止session_waiter执行期间新的输入使界面显示异常。在流式输入结束后设置isStreaming以恢复文本框。

AstrBotDevs#3037 AstrBotDevs#2892
@auto-assign auto-assign bot requested review from Fridemn and advent259141 October 15, 2025 05:37
Copy link
Contributor

@sourcery-ai sourcery-ai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

你好 - 我已经审阅了你的更改,它们看起来很棒!


Sourcery 对开源免费 - 如果你喜欢我们的评论,请考虑分享它们 ✨
帮助我更有用!请在每条评论上点击 👍 或 👎,我将利用这些反馈来改进你的评论。
Original comment in English

Hey there - I've reviewed your changes and they look great!


Sourcery is free for open source - if you like our reviews please consider sharing them ✨
Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.

@Dt8333 Dt8333 changed the title fix(dashboard): 修复绘画控制期间webchat文本框禁用的问题 fix(dashboard): 修复会话控制期间webchat文本框禁用的问题 Oct 16, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug]当插件中启用会话控制时,webchat在进入会话后会一直处于加载状态,直到会话超时

1 participant